<!--main content start-->
<section id="main-content">
	<section class="wrapper">
		<!--state overview end-->
		<div class="row">
			<div class="col-lg-12">
				<div class="alert alert-block alert-danger fade in">
					<button data-dismiss="alert" class="close close-sm" type="button">
						<i class="icon-remove"></i>
					</button>
					<strong>友情提示：</strong>
					报销申请提交后，即发送给相关联项目负责人进行审批，根据具体报销金额大小区分是否需要高层领导审批。
				</div>
				<section class="panel">
					<header class="panel-heading">
						出差报销申请
						<i class="add-icon icon-file-text-alt" ng-click="disDraft()"> 草稿箱</i>
					</header>
					<div class="panel-body">
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">外部人员姓名(可选)</label>
							<div class="col-sm-10">
								<input type="text" certus-an-limit-length="50" class="form-control" ng-model="trEntity.assignee"
									list="browsers1" placeholder="替非本地公司人员报销时候填写，如果是本人则不用填写，请输入完整姓名后匹配选择。">
								<datalist id="browsers1" ng-model="selected">
									<option ng-repeat="x in userSelect" value="{{x.userName}}">
								</datalist>
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">对应出差单号*</label>
							<div class="col-sm-10">
								<select class="form-control" ng-model="trEntity.travelCode"
									ng-change="travelCodeChange(trEntity.travelCode)">
									<option ng-repeat="x in availablePolicyNumberSelect" certus-required value="{{x.code}}">{{x.name}}
									</option>
								</select>
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">出差报销总金额</label>
							<div class="col-sm-10">
								<input type="text" certus-an-limit-length-num="50" certus-required class="form-control"
									ng-model="trEntity.totalAmount" ng-disabled="true">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">冲销金额(可选)</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" certus-an-limit-length-num="15"
									placeholder="如果需要冲销，请填写本栏冲销金额，和下面的借款单单号" ng-model="trEntity.chargeAgainest">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">借款单单号</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" list="browsersReim"
									placeholder="请从借款流程查询借款单号后拷贝到这里，请保证输入的借款单号正确" ng-model="trEntity.borrowCode">
								<datalist id="browsersReim" ng-model="selected">
									<option ng-repeat="x in triburseSelect" value="{{x.borrowerCode}}">
								</datalist>
							</div>
						</div>

					</div>
				</section>
				<section class="panel afrinfo" style="display: none;">
					<header class="panel-heading">
						报销分摊明细
					</header>
					<div class="panel-body">
						<!--<div class="form-group customerForm">
                            <label class="col-sm-2 control-label">报销主体公司</label>
                            <div class="col-sm-10">
                                <select class="form-control" ng-model="trItem.trCompanyCode">
                                    <option ng-repeat="x in ccCompanySelect" certus-required-polyfill value="{{x.code}}">{{x.name}}</option>
                                </select>
                            </div>
                        </div>-->
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">报销类目</label>
							<div class="col-sm-10">
								<select class="form-control" ng-model="trItem.triClassCode">
									<option ng-repeat="x in ccClassSelect" certus-required-polyfill value="{{x.code}}">
										{{x.name}}
									</option>
								</select>
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">开始日期</label>
							<div class="col-sm-10">
								<input id="dateTime1" class="form-control" certus-required-polyfill ng-model="trItem.startDate"
									onchange="dateChange1()">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">结束日期</label>
							<div class="col-sm-10">
								<input id="dateTime2" class="form-control" certus-required-polyfill ng-model="trItem.endDate"
									onchange="dateChange2()">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">金额</label>
							<div class="col-sm-10">
								<input type="text" certus-an-limit-length-num="10" class="form-control" certus-required-polyfill
									ng-model="trItem.money">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">开始地点</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" certus-required-polyfill certus_an_limit_length="50"
									ng-model="trItem.startAddr">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">结束地点</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" certus-required-polyfill certus_an_limit_length="50"
									ng-model="trItem.endAddr">
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">说明</label>
							<div class="col-sm-10">
								<textarea class="form-control" certus-required-polyfill certus_an_limit_length="120"
									ng-model="trItem.trInstruction" placeholder="字数限制120字以内"></textarea>
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">原始单据数量</label>
							<div class="col-sm-10">
								<input type="text" certus_an_limit_length_int="50" class="form-control" certus-required-polyfill
									ng-model="trItem.triNum">
							</div>
						</div>
						<p class="default-buttons">
							<a href="javascript:void(0);" class="button-back btn btn-info" ng-click="closeAddItem();">取消</a>
							<a href="javascript:void(0);" class="button-next  btn btn-info" ng-click="itemSubmit()">提交</a>
						</p>
					</div>
				</section>
				<section class="panel haddpro" style="display: none;">
					<header class="panel-heading">
						项目分配信息(剩余￥{{surplus}})
					</header>
					<div class="panel-body">
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">项目名称</label>
							<div class="col-sm-10">
								<select class="form-control" ng-model="triPercent.projId" ng-disabled="triPercentDis">
									<option ng-repeat="x in availableProjNumberSelect" value="{{x.code}}">{{x.name}}
									</option>
								</select>
							</div>
						</div>
						<div class="form-group customerForm">
							<label class="col-sm-2 control-label">金额</label>
							<div class="col-sm-10">
								<input type="text" certus-an-limit-length-num="50" class="form-control" ng-model="triPercent.money"
									placeholder="请分配发票金额以内">
							</div>
						</div>
						<p class="default-buttons">
							<a href="javascript:void(0);" class="button-back btn btn-info" onclick="haddpro1();">取消</a>
							<a href="javascript:void(0);" class="button-next  btn btn-info"
								ng-click="percentSubmit(triPercent.projId)">提交</a>
						</p>
					</div>
				</section>
				<section class="panel">
					<header class="panel-heading add-heading">
						报销费用明细
						<i class="add-icon icon-plus" ng-click="addItem()"> 新增</i>
					</header>
					<div class="panel-body">
						<div id="afrContainerCCBX" class="dlshouwen-grid-container"></div>
						<div id="afrToolBarContainerCCBX" class="dlshouwen-grid-toolbar-container"></div>
					</div>
				</section>
				<section class="panel">
					<div class="panel-body">
						<p class="default-buttons">
							<a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
							<a href="javascript:void(0);" class="button-next  btn btn-success btn-l10"
								ng-click="startCCBXLc()">确认提交</a>
							<a href="javascript:void(0);" class="button-next  btn btn-info " ng-click="saveDraftCCBX()"><i
									class="icon-save"></i> 暂存</a>
						</p>
					</div>
				</section>
				<!-- Modal -->
				<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
					aria-hidden="true">
					<div class="modal-dialog">
						<div class="modal-content">
							<section class="panel">
								<div class="panel-heading add-heading">
									报销费用项目占比信息
									<i class="add-icon icon-remove" data-dismiss="modal" aria-hidden="true"></i>
								</div>
								<div class="panel-body selpro-box">
									<table class="table table-bordered">
										<tbody>
											<tr>
												<td>报销分公司</td>
												<td>
													<span>{{trItem.trCompanyName}}</span>
												</td>
											</tr>
											<tr>
												<td>报销类目</td>
												<td>
													<span>{{trItem.triClassName}}</span>
												</td>
											</tr>
											<tr>
												<td>发票金额</td>
												<td>
													<span>￥{{trItem.money}}元</span>
												</td>
											</tr>
											<tr ng-repeat="bb in nowprojectPercents">
												<td>{{bb.projName}}</td>
												<td>
													<div class="sh-btn">
														<span>￥{{bb.money}}</span>
														<button class="sedit-label btn btn-xs btn-danger" ng-click="delPercent(bb.projId);">
															<i class="fa fa-trash-o"></i> 删除
														</button>
														<button class="sedit-label btn btn-xs btn-info" ng-click="editPercent(bb.projId);">
															<i class="fa fa-edit"></i> 修改
														</button>
													</div>
													<div class="hd-btn" style="display: none;">
														<input type="text" onkeyup="clearNoNum(this)" onblur="clearNoNum(this)" value=""
															class="form-control" min="0" max="100">
														<button class="sedit-label btn btn-xs btn-info" onclick="closePro(1);">
															<i class="icon-share-alt"></i> 取消
														</button>
														<button class="sedit-label btn btn-xs btn-success" onclick="closePro(1);">
															<i class="icon-refresh"></i> 确认
														</button>
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="panel-bg"></div>
							</section>
						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
				<!-- Modal -->
				<div class="modal fade" id="yourModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
					aria-hidden="true">
					<div class="modal-dialog">
						<div class="modal-content">
							<section class="panel">
								<div class="panel-heading add-heading">
									草稿列目
									<i class="add-icon icon-rem0ove" data-dismiss="modal" aria-hidden="true"></i>
								</div>
								<div class="panel-body selpro-box">
									<table class="table table-bordered">
										<tbody>
											<tr ng-repeat="xx in dafts">
												<td>
													<span><a ng-click="openDraf(xx.trCode)">{{xx.createTime |
                                                            date:'yyyy-MM-dd hh:mm'}}</a></span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="panel-bg"></div>
							</section>
						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
				<!-- /.modal -->
			</div>
		</div>
	</section>
</section>